<div class="page-bar">
	<ul class="page-breadcrumb">
		<li><span>管理子系统</span> <i class="fa fa-angle-right"></i></li>
		<li><span>用户管理</span> <i class="fa fa-angle-right"></i></li>
		<li><span>修改用户</span></li>
	</ul>
</div>
<div class="content" id="staff_update_content">
	<div class="page_form row">
		<div class="col-sm-12">
			<form class="form-horizontal" id="staff_update_form">
				<input type="hidden" name="id" th:value="${staff.id}"/>
				<div class="row form_split_title">
					<h4 class="col-sm-12"><font color="#e7505a">▎</font> <b>基本信息</b> </h4>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>昵称:</label>
						<div class="col-sm-6">
							<input type="text" name="nickName" class="form-control input-sm" placeholder="昵称" th:value="${staff.nickName}"></input>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>手机:</label>
						<div class="col-sm-6">
							<input type="text" name="mobile" class="form-control input-sm" placeholder="手机" th:value="${staff.mobile}"></input>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>邮箱:</label>
						<div class="col-sm-6">
							<input type="text" name="email" class="form-control input-sm" placeholder="邮箱" th:value="${staff.email}"></input>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>状态:</label>
						<div class="col-sm-6">
							<div>
								<label class="radio-inline"><input th:checked="${staff.status}==1" checked="checked" name="status" type="radio" value="1"/>启用</label>
								<label class="radio-inline"><input th:checked="${staff.status}==0" name="status" type="radio" value="0"/>禁用</label>
							</div>
						</div>
					</div>
				</div>
				
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>角色:</label>
						<div class="col-sm-6">
							<div>
								<label class="checkbox-inline" th:if="${not #lists.isEmpty(roles)}" th:each="role : ${roles}">
									<input name="roleIds" type="checkbox" th:value="${role.id}" th:checked="${role.isInChecked}"/>
									<span th:text="${role.name}"></span>
								</label>
							</div>
						</div>
					</div>
				</div>
				<hr class="col-sm-12" />
				<div class="row form_split_title">
					<h4 class="col-sm-12"><font color="#e7505a">▎</font> <b>资料上传</b> </h4>
				</div>
				<div class="row">
					<!-- http://www.cnblogs.com/leechenxiang/p/6603884.html -->
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>头像:</label>
						<div class="col-sm-6">
							<div id="staff_update_head_image" th:attr="init_value=${staff.headImgUrl}" class="image-upload">
								<div class="image-upload-section" style="background:#eeeeee"></div>
							</div>
							<span class="form_tips">提示：图片大小不能超过2M</span>
						</div>
					</div>
				</div>
				<hr class="col-sm-12" />
				<div class="row">
					<div class="form-group col-sm-12">
						<div class="form-group" style="margin: 5px;">
							<div class="col-sm-12 text-right">
								<button type="button" class="btn btn-success btn-sm" style="margin-right:10px;" onclick="update_staff();">保存</button>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	require(["./static/pages/scripts/system/staff"], function(staff){
		staff.initUpdateDialog();
	});
</script>
</html>